//
//  UIButton+HS_Public.m
//  HolyShit
//
//  Created by Robin on 2016/12/6.
//  Copyright © 2016年 HolyShit. All rights reserved.
//

#import "UIButton+HS_Public.h"

@implementation UIButton (HS_Public)

+ (UIButton *)buttonWithFont:(UIFont *)font color:(UIColor *)color
{
    return [self buttonWithFrame:CGRectZero font:font color:color title:nil];
}

+ (UIButton *)buttonWithFrame:(CGRect)frame font:(UIFont *)font color:(UIColor *)color
{
    return [self buttonWithFrame:frame font:font color:color title:nil];
}

+ (UIButton *)buttonWithFrame:(CGRect)frame font:(UIFont *)font color:(UIColor *)color title:(NSString *)title
{
    UIButton *button = [[UIButton alloc] initWithFrame:frame];
    button.titleLabel.font = font;
    [button setTitleColor:color forState:UIControlStateNormal];
    if ([title isNotBlank]) {
        [button setTitle:title forState:UIControlStateNormal];
    }
    return button;
}

@end
